<!-- 徐荣凶镬 -->
<template>
  <div class="content">
    <h3>{{ res }}</h3>
    <van-button @click="play">抽签</van-button>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const res = ref<string>("无");
const play = (): void => {
  let random = Math.floor(Math.random() * 3) + 1;
  if (random === 1) {
    res.value = "受到1点火焰伤害且本回合不能对你使用【杀】";
  } else if (random === 2) {
    res.value = "流失1点体力且本回合手牌上限-1";
  } else {
    res.value = "你随机获得其一张手牌和一张装备区里的牌";
  }
};
</script>

<style scoped lang="scss">
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  h3 {
    width: 100%;
    text-align: center;
  }
}
</style>
